//
//  YDYMainScroll.m
//  DY_Bilibili
//
//  Created by 杨德勇 on 2016/9/28.
//  Copyright © 2016年 杨德勇. All rights reserved.
//

#import "YDYMainScroll.h"
#import "YDYFanJuView.h"
@implementation YDYMainScroll

-(instancetype)initWithCoder:(NSCoder *)aDecoder{
    if (self = [super initWithCoder:aDecoder]) {
        
    }
    return self;
}

-(void)awakeFromNib{
    [super awakeFromNib];
    self.showsVerticalScrollIndicator = NO;
    self.showsHorizontalScrollIndicator = NO;
    self.backgroundColor = [UIColor clearColor];
    self.bounces = NO;
    self.contentSize = CGSizeMake(YDYScreenSize.width * 5, YDYScreenSize.height);
    self.pagingEnabled= YES;


    //0.番剧
 
    for (int i =0 ; i <= 5; i++) {
        switch (i) {
                
            case 0:{
                YDYFanJuView *fanjuView =[[YDYFanJuView alloc]initWithFrame:CGRectMake(YDYScreenSize.width * i, 0, YDYScreenSize.width, YDYScreenSize.height)];
                
                [self addSubview:fanjuView];
                
            }break;
            
                
              
                
            default:{
                UIView *test = [[UIView alloc]initWithFrame:CGRectMake(YDYScreenSize.width * i, 0, YDYScreenSize.width, YDYScreenSize.height)];

                [self addSubview:test];
            }break;
                
        }
    }
}
@end
